package design.factory;

/**
 * 简单工厂模式
 */
public class SimpleFactory {
    public static Product createProduct(String type){
        if("0".equals(type)){
            return new ProductA();
        }else if("1".equals(type)){
            return new ProductA1();
        }else {
            return null;
        }
    }
}
